﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="CalculateBMI.aspx.vb" Inherits="WeightLossProject.CalculateBMI" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        <H2 class=custom-header>Calculate Body Mass Index (BMI)</H2>
<asp:Label ID="Label1" runat="server" Text="Enter Your Weight in Kilograms" 
        CssClass="formlabel"></asp:Label>
<asp:TextBox ID="txtWeight" runat="server" CssClass="frmDisplayEdit"></asp:TextBox>
    <asp:RequiredFieldValidator ID="rfvTxtWeight" runat="server" 
        ControlToValidate="txtWeight" CssClass="error" Display="Dynamic" 
        ErrorMessage="Please Enter your Weight in Kilograms!"></asp:RequiredFieldValidator>
    <asp:RangeValidator ID="rvtxtWeight" runat="server" 
        ControlToValidate="txtWeight" CssClass="error" Display="Dynamic" 
        ErrorMessage="Weight should be between 1 and 1000 Kgs!" MaximumValue="1000" 
        MinimumValue="1" Type="Double"></asp:RangeValidator>
    <p>
        <asp:Label ID="Label2" runat="server" Text="Enter Your Height in Metres" 
            CssClass="formlabel"></asp:Label>
        <asp:TextBox ID="txtHeight" runat="server" CssClass="frmDisplayEdit"></asp:TextBox>
        <asp:RequiredFieldValidator ID="rfvTxtHeight" runat="server" 
            ControlToValidate="txtHeight" CssClass="error" Display="Dynamic" 
            ErrorMessage="Please Enter your Height in Meters!"></asp:RequiredFieldValidator>
        <asp:RangeValidator ID="rvtxtHeight" runat="server" 
            ControlToValidate="txtHeight" CssClass="error" Display="Dynamic" 
            ErrorMessage="Height should be between 0.5 and 4 Metres!" MaximumValue="4" 
            MinimumValue="0.5" Type="Double"></asp:RangeValidator>
</p>
<p>
        <asp:Button ID="btnCalculateBMI" runat="server" 
            Text="Calculate Body Mass Index" />
</p>
<p>
        <asp:Label ID="lblResult" runat="server" CssClass="frmDisplayView" 
            Font-Size="Larger" ForeColor="#003300" Height="58px" Width="598px"></asp:Label>
</p>

    <asp:Label ID="lblBMI" runat="server" Visible="False"></asp:Label>
    <br />
    <asp:Image ID="Image2" runat="server" ImageAlign="Middle" 
         />
    <br />
</asp:Content>
